package org.netty.push.api.exception;

import org.netty.push.api.dto.BaseResult;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class SysExceptionHandler {
	
	@ExceptionHandler(Throwable.class)
	@ResponseStatus(HttpStatus.BAD_REQUEST)
	public BaseResult<?> excetpion( Throwable e) {
		return new BaseResult("400",e.getMessage());
	}

}
